﻿@{
    ViewBag.Title = "ReViewListIndex";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using CNKI.TPI.Web.Search.Model;
@using CNKI.TPI.Web.Base;
<script>
    function submitCheck(dbid, dbcode, type, displayname) {
        $.ajax({
            type: "GET",
            url: timestamp("@Html.Raw(Url.Action("CheckSubmit", "Submit"))"),
            data: { "dbid": dbid },
            success: function (m) {
                if (m == "True") {
                    var url = "@Html.Raw(Url.Action("ReViewIndex", "Submit"))?dbID=" + dbid + "&dbCode=" + dbcode + "&mediaType=" + type + "&displayName=" + escape(displayname);
                    window.location.href = url;
                }
                else {
                    messageAlert("您没有审核权限！");
                    return;
                }
            },
            error: function (e)
            { }
        })
    }
</script>
<div class="center-box center-box-bd">
    <div class="wrap posr">
        <h2 class="bbsolid bbsolidw2 mb10"><i class="blue-block"></i><span class="center-box-h-span2">数据库列表</span></h2>
        <ul class='clearfix' style='padding: 10px 0px 0px 0px;'>
            @if (ViewBag.DatabaseList != null && ViewBag.DatabaseList.Count > 0)
            {
                foreach (SYS_CMS_DATABASE_CLS_NODE item in ViewBag.DatabaseList)
                {
                    foreach (SYS_CMS_DATABASE item1 in item.DatabaseList)
                    {
                        int type = 0;
                        if (item1.DatabaseType == 4 || item1.DatabaseType == 5 || item1.DatabaseType == 6 || item1.DatabaseType == 1)
                        {
                            type = item1.DatabaseType;
                        }
                        if (item1.SearchType == ((int)SearchType.TPI))
                        {
                <li class='li-bg col-md-4'>
                    <a onclick=" submitCheck('@item1.SysID','@item1.DatabaseCode','@type','@item1.DatabaseName')"  href="javascript:void(0)">@item1.DatabaseName</a>
                    @*<a href="~/Submit/ReViewIndex?dbID=@item1.SysID&dbCode=@item1.DatabaseCode&mediaType=@type&displayName=@Server.UrlEncode(item1.DatabaseName)">@item1.DatabaseName</a>*@
                </li>
                  
                        }
                    }
                }
            }
            @if (ViewBag.MediaResource != null && ViewBag.MediaResource.Count > 0)
            {
                foreach (SYS_CMS_PUBLISHTYPE item in ViewBag.MediaResource)
                {
                    foreach (SYS_CMS_DATABASE item1 in item.DatabaseList)
                    {
                        int type = 0;
                        if (item.SysID == 4 || item.SysID == 5 || item.SysID == 6 || item.SysID == 1)
                        {
                            type = item.SysID;
                        }
                        if (item1.SearchType == ((int)SearchType.TPI))
                        {
                <li class='li-bg col-md-4'>
                       <a onclick=" submitCheck('@item1.SysID','@item1.DatabaseCode','@type','@item1.DatabaseName')"  href="javascript:void(0)">@item1.DatabaseName</a>
                    @*<a href="~/Submit/ReViewIndex?dbID=@item1.SysID&dbCode=@item1.DatabaseCode&mediaType=@type&displayName=@Server.UrlEncode(item1.DatabaseName)">@item1.DatabaseName</a>*@

                </li>
                        }
                    }
                }
            }
        </ul>
    </div>
</div>
